import requests
from common.read_yaml import ReadYamlData,ReadYamlConfigs


class Login():
    def login(self,inData,mode=True):
        url = ReadYamlConfigs("data.yaml").get_yaml_data()['HOST'] + ReadYamlData("login.yaml").get_yaml_data()['url']
        resp = requests.post(url,json=inData)
        if mode:
            return resp.json()
        else:
            return resp.json()

